
#include <iostream>
#include <vector>
#include <cstdio>
using namespace std;

//01 backpack
int main()
{
    int N = 0, V = 0;
    while(scanf("%d%d",&V,&N)!=EOF,V+N/*cin >> V >> N && N && V*/)
    {
        vector<double> val(N, 0);
        vector<int> w(N, 0);
        vector<double> dp(V+1, 1.0);
        for (int i = 0; i < N; i++)
        {
            cin >> w[i] >> val[i];
            val[i] = 1 - val[i];    
        }
        for (int i = 0; i < N; i++)
            for (int v = V; v >= w[i]; v--)
                dp[v] = min(dp[v], dp[v - w[i]] * val[i]);
        printf("%.1f%%\n", (1 - dp[V]) * 100);
    }
    return 0;
}
